package com.bobi.tfca.model.vo;

import cn.hutool.core.bean.BeanUtil;
import com.bobi.tfca.model.entity.MemberProfileEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * @author 李文发
 * @date 2024/4/18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "会员档案")
public class MemberProfileVO implements Serializable {

    @Serial
    private static final long serialVersionUID = -3802660203670644003L;

    @ApiModelProperty(value = "会员档案id")
    // 会员档案id
    private Integer memberProfileId;
    @ApiModelProperty(value = "会员姓名")
    // 会员姓名
    private String memberName;
    @ApiModelProperty(value = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    // 出生日期
    private LocalDate birthday;
    @ApiModelProperty(value = "性别")
    // 性别
    private String sex;
    @ApiModelProperty(value = "联系电话")
    // 联系电话
    private String telephone;
    @ApiModelProperty(value = "电子邮箱")
    // 电子邮箱
    private String email;
    @ApiModelProperty(value = "联系地址")
    // 联系地址
    private String address;
    @ApiModelProperty(value = "会员照片")
    // 会员照片
    private String picture;
    @ApiModelProperty(value = "入会目的")
    // 入会目的
    private String entryPurpose;
    @ApiModelProperty(value = "民族")
    // 民族
    private String nationality;
    @ApiModelProperty(value = "籍贯")
    // 籍贯
    private String nativePlace;
    @ApiModelProperty(value = "入会日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    // 入会日期
    private LocalDate entryDate;
    @ApiModelProperty(value = "退会日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    // 退会日期
    private LocalDate exitDate;
    @ApiModelProperty(value = "政治面貌")
    // 政治面貌
    private String politicsStatus;
    @ApiModelProperty(value = "健康状况")
    // 健康状况
    private String healthCondition;
    @ApiModelProperty(value = "个人特长及特长")
    // 个人特长及特长
    private String skills;
    @ApiModelProperty(value = "会员id")
    // 会员id
    private Integer memberId;
    @ApiModelProperty(value = "身份证号")
    private String idcard;
    @ApiModelProperty(value = "QQ号")
    private String qq;
    @ApiModelProperty(value = "微信号")
    private String wechat;
    @ApiModelProperty(value = "角色")
    private String role;

    public static MemberProfileVO ofMemberProfileEntity(MemberProfileEntity entity) {
        MemberProfileVO vo = BeanUtil.copyProperties(entity, MemberProfileVO.class);
        return vo;
    }
}
